import pyqtgraph as pg
import numpy as np
 
x = np.random.random(50)
a = np.random.random(8)


win = pg.GraphicsWindow(title="州的先生zmister.com PyQtGraph教程")
plot = win.addPlot(title='窗口绘制图形')
plot.plot(x)
plot2 = win.addPlot(title='绘制子图')
plot2.plot(a)
pg.QtGui.QApplication.exec_()